
$(function(){

    var producterId = $.getUrlParam('producterId')
    $('.d_header>.head-back').click(function(){
        window.history.go(-1);
    })



    producter();
    function producter() {
        post({
            url : '/customizeProduct/manufacturer/detail/'+producterId,
            success : function (data) {
                console.log(data);
                var _html = "";
                var imageUrls = data.imageUrls.split(",");
                console.log(imageUrls);
                for(var i = 0;i<imageUrls.length;i++){
                    _html += '<li class="swiper-slide">';
                    _html += '<img src="'+SERVER_CONTEXT_PATH+'/load/picture/'+imageUrls[i]+'" alt=""></li>';
                }                
                $('.ban-swiper>ul').append(_html);
                $('.product-name').text(data.name);
                $('.introduct').append(data.remark);
                var bannerSwiper = new Swiper('.ban-swiper', {
                    loop: true, //环路
                    pagination: '.swiper-pagination',
                    autoplay: 5000,
                    autoplayDisableOnInteraction: false //,  //用户操作后是否进行循环播放
                });
            },
            error : function (msg) {
                console.log("错误");
            }
        })
    }

})